<?php
#                                                                                 
# author: Cody Sorgenfrey                                       
# (c)2013 South Hill Calvary Chapel                                               
#                                                                                 
include_once("../mysql/database_info.php");
include_once("../mysql/common.php");
include_once("../common.php");
connect_select_test("events");
$vars = explode("|cell|", $_GET['vars']);
$id = array_shift($vars);
$tableID = array_shift($vars);
$column = $vars[0];
$val = $vars[1];
//real query
$insert = "UPDATE `Registration_$tableID` ";
$insert.="SET `".$column."`='".$vars[1]."' ";
$insert.="WHERE `id`='".$id."'";
if (mysql_query($insert)){
	echo "Updated Column:\"$column\"";
} else {
	echo "Error! You may have tried to edit a cell that doesn't pertain to that particular row.";
}
?>